class MarioItem_MushroomAI extends Actor;



//var Actor Destination;
////var MarioEnemy MyPawn;
//var Pawn thePlayer;
//var float perceptionDistance;
//var float distanceToPlayer;
//var float distanceX;
//var float distanceY;
//var float distanceZ;
//var Vector v,vec;
//var Vector loc;
//var Vector loc2;
//var bool hit;


//state Patrolling
//{
	
//	event SeePlayer(Pawn SeenPlayer)
//	{
//		if(playercontroller(SeenPlayer.controller) == None)
//			return;
//		thePlayer = SeenPlayer;

//		`log("SEE YOU!");
//		if(move == 0)
//			move = 1;
		
//	}

//Begin:
//	Pawn.SetDrawScale(3.0);
//   	if(move == 1){
//			loc = thePlayer.Location;
//			//loc.X = 0;
//			//loc.Y = 0;
//			//loc.Z = 0;
//			loc2 = Pawn.GetPawnViewLocation();
//			if(loc2.Y > loc2.X)
//			{
//				if(thePlayer.Location.X < Pawn.Location.X || Pawn.Location.X == 0){
//					loc.X = loc.X*-400;
//				}
//				else{
//					loc.X = loc.X*400;
//				//loc.X = -30;
//				}
//			}
//			else
//			{
//				if(thePlayer.Location.Y < Pawn.Location.Y || Pawn.Location.Y == 0){
//					loc.Y = loc.Y*(0-400);
//				}
//				else{
//					loc.Y = loc.Y*400;
//				//loc.Y = -100;
//				}
//			}
//			//MoveToward(thePlayer, thePlayer);
//			Pawn.MaxDesiredSpeed = 0.3f;
			
//			if(Loc.Y != thePlayer.Location.Y && thePlayer.Location.Y < Pawn.Location.Y && loc.Y > 0){
//				loc.Y = loc.Y * -1;
//			}

//			else if(Loc.X != thePlayer.Location.X && thePlayer.Location.X < Pawn.Location.X && loc.X > 0){
//				loc.X = loc.X * -1;
//			}
			
//			MoveTo(loc);
						
//				move = 2;
			
			
//		}
		
//   LatentWhatToDoNext();
//}

//state Done
//{
//Begin:
//    vec.Y = 0;
//    vec.X = 0;
//    vec.Z = -500;
//	//Pawn.Suicide();
//	//MyPawn.Suicide();
//    Pawn.Move(vec);
//	Pawn.Destroy();
//	`log("DEAD! BANG BANG!");
//	Pawn.Acceleration = vect(0,0,0);

//}


//defaultproperties
//{
//	SetTimer(0.3f, true);
//}

//event Timer()
//{
//	distanceToPlayer = VSize(thePlayer.Location - Pawn.Location);
//	distanceX = Abs(Abs(thePlayer.Location.X) - Abs(Pawn.Location.X));
//	distanceY = Abs(Abs(thePlayer.Location.Y) - Abs(Pawn.Location.Y));
//	distanceZ = Abs(Abs(thePlayer.Location.Z) - Abs(Pawn.Location.Z));
	
//	 if( distanceToPlayer < 70.0f || (distanceX < 70.0f && distanceY < 70.0f && distanceZ < 40)){
//	//if(hit){
//		//thePlayer.Destroyed();
//		//thePlayer.Suicide();
//		thePlayer.Controller.SwitchToBestWeapon();
//	 	Pawn.Destroy();
//		`log("DEAD! BANG BANG!");
		
			
//		//Pawn.Acceleration = vect(0,0,0);
		
//   }
//   /*else if(distanceZ >= 50)
//   {
//		Pawn.Suicide();
//   }*/
//   `log("X:"$distanceX$" Y:"$distanceY$" Z:"$distanceZ$" Dist:"$distanceToPlayer);
//   `log("Player X:"$thePlayer.Location.X$" Y:"$thePlayer.Location.Y$" Z:"$thePlayer.Location.Z);
//   `log("Pawn X:"$Pawn.Location.X$" Y:"$Pawn.Location.Y$" Z:"$Pawn.Location.Z);
//}